package com.chenyuxin.ilp.controller.user;

import com.chenyuxin.ilp.model.dto.user.RegisterFormDto;
import com.chenyuxin.ilp.model.pojo.Result;
import com.chenyuxin.ilp.service.user.RegisterService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user/register")
@RestController
public class RegisterController {
    @Autowired
    private RegisterService registerService;
    @PostMapping
    public Result register(@RequestBody  RegisterFormDto registerFormDto){
        return registerService.register(registerFormDto);
    }
}
